<?php

class IndexController extends Zend_Controller_Action {

    public function init() {
        /* Initialize action controller here */
    
                $this->view->controller = $this->getRequest()->getParam('controller');
    }

    public function indexAction() {

//        $row = 1;
//        $newhandle = fopen(ROOT_PATH."/data/lang/en-new.csv", "w");
//        if (($handle = fopen(ROOT_PATH."/data/lang/ar.csv", "r")) !== FALSE) {
//            while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
//                $num = count($data);
//                echo "<p> $num fields in line $row: <br /></p>\n";
//                $row++;
//                if($row>2){
//                for ($c = 0; $c < $num; $c++) {
//                    echo $data[$c] . "<br />\n";
//                    if($c==0)
//                        fwrite($newhandle,$data[0].';'.$data[1]."\r\n");
//                }
//                }else{
//                    fwrite($newhandle,$data[0]."\r\n");
//                }
//            }
//            
//            fclose($newhandle);
//            fclose($handle);
//            rename(ROOT_PATH."/data/lang/en.csv", ROOT_PATH."/data/lang/en-backup.csv");
//        }
//        
        
    }

}